<?php

namespace App\Dto;

class AuthDto extends BaseDto
{
    public static $user = null;
    public static $site = null;
    public static int $siteId = 0;

    //设置当前登录用户信息
    public static function setUser($user)
    {
        self::$user = $user;

        return self::$user;
    }

    //获取当前登录用户信息
    public static function getUser()
    {
        return self::$user;
    }

    //获取当前登录用户id
    public static function userId()
    {
        return self::$user?->id;
    }

    //设置当前服务商信息
    public static function setSiteInfo($site)
    {
        self::$site = $site;

        return self::$site;
    }

    //获取当前服务商信息
    public static function getSiteInfo()
    {
        return self::$site;
    }

    //设置当前服务商id
    public static function setSiteId(int $siteId): int
    {
        self::$siteId = $siteId;

        return self::$siteId;
    }

    //获取当前登录服务商Id
    public static function siteId(): int
    {
        return self::$siteId;
    }

    public static function setPlatform(): string
    {
        return self::$platform = self::$platform;
    }
}
